package com.wh1200.mybatis.xmlless.model.dto

import com.wh1200.mybatis.xmlless.model.base.BaseSimpleClassWrapper
import com.wh1200.mybatis.xmlless.resolver.ParameterResolver

/**
 * @author 吴昊
 * @date 2024/01/19
 * @version 1.0
 * @since v4.0.0
 */
class JavaSimpleClassWrapper(private val propertyType: Class<*>) : BaseSimpleClassWrapper {

  override fun getJavaClass(): Class<*> {
    return propertyType
  }

  override fun isComplex(): Boolean {
    return ParameterResolver.isComplexType(propertyType)
  }

  override fun isBoolean(): Boolean {
    return propertyType == Boolean::class.java
  }

  override fun isString(): Boolean {
    return propertyType == String::class.java
  }

}
